package com.niiwoo.civet.user.enums;

import com.niiwoo.tripod.provider.exception.NoSuchEnumValueException;
import lombok.AllArgsConstructor;
import lombok.Getter;


/**
 * Created by luosiwen on 2018/3/2.
 */
@Getter
@AllArgsConstructor
public enum LinkFaceAuditStatusEnum {

    ARTIFICIAL (new Byte("0"),"人工审核",FacePlusAuditStatusEnum.NEED_AUDIT),
    PASS(new Byte("1"),"审核通过",FacePlusAuditStatusEnum.SUCCESS),
    NOT_PASS(new Byte("2"),"审核不通过",FacePlusAuditStatusEnum.FAILURE),
    ;
    private Byte status;
    private String desc;
    private FacePlusAuditStatusEnum facePlusAuditStatusEnum;


    public static LinkFaceAuditStatusEnum of(Byte status){
        for(LinkFaceAuditStatusEnum linkFaceAuditStatusEnum : LinkFaceAuditStatusEnum.values()){
            if(linkFaceAuditStatusEnum.getStatus().equals(status)){
                return linkFaceAuditStatusEnum;
            }
        }
        throw new NoSuchEnumValueException("LinkFaceAuditStatusEnum:" + status);
    }
}
